<#--
/****************************************************
 * Description: 菜单的简单列表页面，没有编辑功能
 * Copyright:   Copyright (c) 2013
 * Company:     beiwaionline
 * @author      bfsu
 * @version     1.0
 * @see
	HISTORY
    *  2013-08-08 bfsu Create File
**************************************************/
-->
<#include "/view/templates/ace/ace-inc.ftl">
<div class="table-responsive">
<table class='table'>
	<thead>
		<th>名称</th>
		<th>对应权限</th>
		<th>菜单地址</th>
		<th>序号</th>
		<th>操作</th>
	</thead>
	<tbody>
<#list menus as m>
	<tr>
		<td>${m.title!""}</td>
		<td>${m.privilegeCode!""}</td>
		<td>${m.url!""}</td>
		<td>${m.orderSn!""}</td>
		<td><@button icon="pencil" type="primary" size="sm"
			onclick="addChild(${m.id})">添加子菜单</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="alter(${m.id})">修改</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="del(${m.id})">删除</@button>
					</td>
	</tr>
	<#if m.subMenus?? && m.subMenus?size gt 0>
		<#list m.subMenus as mm>
		<tr>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;${mm.title}</td>
			<td>${mm.privilegeCode!""}</td>
			<td>${mm.url!""}</td>
			<td>${mm.orderSn!""}</td>
			<td><@button icon="pencil" type="primary" size="sm"
			onclick="addChild(${mm.id})">添加子菜单</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="alter(${mm.id})">修改</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="del(${mm.id})">删除</@button></td>
		</tr>
			<#if mm.subMenus?? && mm.subMenus?size gt 0>
				<#list mm.subMenus as mmm>
				<tr>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${mmm.title}</td>
					<td>${mmm.privilegeCode!""}</td>
					<td>${mmm.url!""}</td>
					<td>${mmm.orderSn!""}</td>
					<td><@button icon="pencil" type="primary" size="sm"
			onclick="addChild(${mmm.id})">添加子菜单</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="alter(${mmm.id})">修改</@button>
			<@button icon="pencil" type="primary" size="sm"
			onclick="del(${mmm.id})">删除</@button></td>
				</tr>
				</#list>
			</#if>
		</#list>
	</#if>
</#list>
	</tbody>
</table>
</div>


